<?php

class m131116_071905_oak extends CDbMigration
{
    public function safeUp()
    {
        $sql = 'CREATE TABLE `{{interest}}`
                (
                    `id` tinyint PRIMARY KEY,
                    `name` varchar(255),
                    `created_at` datetime,
                    `updated_at` datetime
                )
                ENGINE=InnoDB DEFAULT CHARSET=utf8;

                INSERT INTO `{{interest}}` VALUES(0, "New people", NOW(), NOW());
                INSERT INTO `{{interest}}` VALUES(1, "Friends", NOW(), NOW());
                INSERT INTO `{{interest}}` VALUES(2, "Friends of Friends", NOW(), NOW());';

        $this->execute($sql);
    }

    public function safeDown()
    {
        return false;
    }
}